Subscriptions: Results
Subscriptions: Results
#340750
Description
To see how subscriptions are defined, refer to
Resource
/subscriptions/cloud/<subscriptionRef>
/subscriptions/containers/<subscriptionRef>
/subscriptions/<subscriptionRef>
Note: If you use this resource without the <platformType> specified (i.e. without cloud or containers specified), the behavior is exactly the same as specifying the cloud-specific resource. This behavior enables backward compatibility with scripts using the Densify API prior to release 12.1.6, where the platform-specific indicator was not available.
Supported Operations
Table: Subscription Results Supported Operations
HTTP Method |
Input |
Output |
Description |
Path Parameter: Query String Parameter: |
subscription:
|
Returns the current results of the platform-specific subscription notification, identified by <subscriptionRef>. The returned output is the same information that is delivered to the webhook application if the subscription is scheduled to run at the current time. Note that the following parameters are ignored for on-demand subscription results request:
An appropriate error message and HTTP code are returned for failed requests. See Returned Status |
Table: Subscription Results Path Parameters
Parameter Name |
Type |
Required |
Description |
string |
Y |
[cloud|containers] Specify the technology platform for the subscription results resource. |
|
string |
Y |
Specify the unique subscription identifier. |
Table: Subscription Results Query String Parameters
Parameter Name |
Type |
Required (Y/N) |
Description |
string [true|false] |
|
An option to display a divider that separates properties and tags for each system in the output:
"divider": "------------------------", Note: The divider is not displayed in the output for scheduled subscription results sent to webhooks. |
|
number range [1:30000] |
|
An option to set the limit of returned results. By default, the limit is set to 3000. This implies that the number of results returned is limited to 3000 systems. If a subscription's result count is more than 3000 system recommendations, an error is returned with code 400. If this is the case, you can adjust your on-demand subscription request to a higher limit. For example: ?limit=8000. The range of the limit value is from 1 to 30000. Note: This limit does not apply to subscription recommendations sent to webhooks. It only applies to on-demand subscription queries, and hence, will negatively impact web server performance if the limit is set too high. See Example: On-Demand Subscription Results Count Exceeding Limit. |
The following is a complete list of possible response elements returned for the /subscriptions/<platformType>/<subscriptionRef> resource.
Table: Subscription Results Response Schema
Element |
Type |
Filter/Sort |
Description |
Subscription header information. See: |
|||
string |
The subscription name. |
||
string |
The subscription description. |
||
datetime |
|
The date and time when the subscription entity was created. |
|
string |
|
The authenticated Densify user who created the subscription. |
|
datetime |
|
The date and time when the subscription was last modified. |
|
string |
|
The authenticated Densify user who modified the subscription. |
|
datetime |
The date, and time of the last recommendation analysis. This is typically scheduled to run nightly after data collection. |
||
string |
|
The designated owner of the subscription. This field contains the Densify username of the owner. The subscription is considered global if this element is empty and private otherwise. |
|
number |
|
The number of system recommendations in the results collection. |
|
array of returnStructure |
|
An array of system results, with properties and tags defined in the subscription's returnStructure. Refer to
"divider": "------------------------", Refer to the various cloud or container recommendation resource topics for a description of each result element: Analysis: AWS Recommendations: Response, Analysis: Azure Recommendations: Response, Analysis: GCP Recommendations: Response, and Analysis: Kubernetes Container Recommendations: Response. |
|
string |
|
The message for the status response is returned. See Example: On-Demand Subscription Results Count Exceeding Limit for an example of HTTP 400 Bad Request error message. |
|
number |
|
The HTTP response code of the request. Possible status values include:
|
Examples
Example: Getting On-Demand Subscription Cloud Results
The following example shows you how to retrieve your subscription cloud results, on-demand.

Request:
GET /subscriptions/cloud/fa3be33c-fbb7-4912-88c2-a83ee58e444e
Response:
{
"subscription": {
"name": "Sample Subscription",
"description": "A subscription for testing",
"created": "Mon Jan 19 13:52:31 EST 2020",
"createdBy": "saas",
"updated": "Mon Jan 20 14:32:38 EST 2020",
"updatedBy": "SaaSadmin",
"lastRefreshed": "Mon Jan 20 01:32:59 EST 2020",
"owner": "saas"
},
"count": 452,
"results": [
{
"currentType": "standard_d2",
"name": "st01-prepro-edge-307",
"recommendationType": "Modernize - Optimal Family",
"savingsEstimate": "43.850475",
"serviceType": "Virtual Machine",
"divider": "------------------------",
"Availability Zone": "eastus+group"
},
{
"currentType": "r3.2xlarge",
"name": "ex-prepro-stoc-384",
"recommendationType": "Downsize",
"savingsEstimate": "75.36128",
"serviceType": "EC2",
"divider": "------------------------",
"Resource Tags":
[
"Owner : Bob Snow",
"Product Code : PR000263",
"Environment : Pre-prod",
"Inventory Code : prepro-stoc",
"Name : ex-prepro-stoc-384"
],
"Availability Zone": "us-east-1d"
},
{
// ... *SNIP* additional 450 system recommendations not displayed *SNIP* ...
}
]
}
Example: On-Demand Subscription Results Count Exceeding Limit
If your on-demand Subscriptions request contains a large number of results, exceeding the results limit, you will encounter an HTTP 400 Bad Request error message with the count limit.

Request:
GET /subscriptions/cloud/489331bd-5db9-408d-b7a0-2f3f8b1f66e9
Response:
{
"message": "On-Demand Failure. The return count of 3891 has exceeded object return limit of 3000. Update your call with a new limit value. Wed Jul 29 09:05:15 EDT 2020",
"status": 400
}
This error is returned only for on-demand Subscriptions results requests with results count exceeding the default count limit. Subscription results sent to webhooks do not have a count limit. You can override this limit by requesting the on-demand results again with an increased limit count in the URL query string. Note that increasing the results limit may affect response time of the Densify web server.
Request with increased limit count:
GET /subscriptions/cloud/489331bd-5db9-408d-b7a0-2f3f8b1f66e9?limit=4000